<template>
  <div class="top">
    <div class="left">
      <img class="user-img1" :src="this.preson.avatar" alt="" />
      <span class="user-s1">{{this.preson.account}}</span>
    </div>
    <div class="right">
      <div class="content-box">
        <i class="el-icon-star-off" style="font-size:30px;color:white"></i>
        <br>
        <span>会员中心</span>
      </div>
      <div class="content-box">
        <i class="el-icon-setting" style="font-size:30px;color:white"></i>
        <br>
        <span>安全设置</span>
      </div>
      <div class="content-box">
         <i class="el-icon-location-outline" style="font-size:30px;color:white"></i>
        <br>
        <span>地址信息</span>
      </div>
    </div>
  </div>
</template>

<script>
import $per from '@/api/personal'
export default {
  name: "PersonalTop",
  data(){
      return{
        preson:{},
      }
  },
 async created(){
     let res = await $per.profile();
    //  console.log(res.data.result);
     this.preson = res.data.result;
  }
};
</script>
<style lang="scss" scoped>
.top {
  width: 100%;
  height: 110px;
  background: #2ea98f;
  display: flex;
  justify-content: space-between;
  .left {
    width: 25%;
    height: 100%;
    // background: blue;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    .user-img1 {
      width: 80px;
      height: 80px;
      border-radius: 50%;
    }
    .user-s1 {
      color: white;
    }
  }
  .right {
    width: 55%;
    height: 100%;
    // background: yellow;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    .content-box{
        width: 100px;
        height: 50px;
        text-align: center;
        color: white;
        line-height: 30px;
    }
  }
}
</style>